Integrand size = 29, antiderivative size = 168 \[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=-\frac {\left (f g^2-e g h+d h^2\right ) \sqrt {a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac {f \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{\sqrt {c} h^2}+\frac {\left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \text {arctanh}\left (\frac {a h-c g x}{\sqrt {c g^2+a h^2} \sqrt {a+c x^2}}\right )}{h^2 \left (c g^2+a h^2\right )^{3/2}} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {1665, 858, 223, 212, 739} \[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=\frac {\text {arctanh}\left (\frac {a h-c g x}{\sqrt {a+c x^2} \sqrt {a h^2+c g^2}}\right ) \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right )}{h^2 \left (a h^2+c g^2\right )^{3/2}}+\frac {f \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{\sqrt {c} h^2}-\frac {\sqrt {a+c x^2} \left (d h^2-e g h+f g^2\right )}{h (g+h x) \left (a h^2+c g^2\right )} \]
[In]
[Out]
Rule 212
Rule 223
Rule 739
Rule 858
Rule 1665
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (f g^2-e g h+d h^2\right ) \sqrt {a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac {\int \frac {-c d g+a f g-a e h-f \left (\frac {c g^2}{h}+a h\right ) x}{(g+h x) \sqrt {a+c x^2}} \, dx}{c g^2+a h^2} \\ & = -\frac {\left (f g^2-e g h+d h^2\right ) \sqrt {a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac {f \int \frac {1}{\sqrt {a+c x^2}} \, dx}{h^2}+\frac {\left (c d g-2 a f g-\frac {c f g^3}{h^2}+a e h\right ) \int \frac {1}{(g+h x) \sqrt {a+c x^2}} \, dx}{c g^2+a h^2} \\ & = -\frac {\left (f g^2-e g h+d h^2\right ) \sqrt {a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac {f \text {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{h^2}-\frac {\left (c d g-2 a f g-\frac {c f g^3}{h^2}+a e h\right ) \text {Subst}\left (\int \frac {1}{c g^2+a h^2-x^2} \, dx,x,\frac {a h-c g x}{\sqrt {a+c x^2}}\right )}{c g^2+a h^2} \\ & = -\frac {\left (f g^2-e g h+d h^2\right ) \sqrt {a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac {f \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{\sqrt {c} h^2}-\frac {\left (c d g-2 a f g-\frac {c f g^3}{h^2}+a e h\right ) \tanh ^{-1}\left (\frac {a h-c g x}{\sqrt {c g^2+a h^2} \sqrt {a+c x^2}}\right )}{\left (c g^2+a h^2\right )^{3/2}} \\ \end{align*}
Time = 0.85 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.05 \[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=-\frac {\frac {h \left (f g^2+h (-e g+d h)\right ) \sqrt {a+c x^2}}{\left (c g^2+a h^2\right ) (g+h x)}+\frac {2 \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \arctan \left (\frac {\sqrt {c} (g+h x)-h \sqrt {a+c x^2}}{\sqrt {-c g^2-a h^2}}\right )}{\left (-c g^2-a h^2\right )^{3/2}}+\frac {f \log \left (-\sqrt {c} x+\sqrt {a+c x^2}\right )}{\sqrt {c}}}{h^2} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(389\) vs. \(2(154)=308\).
Time = 0.60 (sec) , antiderivative size = 390, normalized size of antiderivative = 2.32
method | result | size |
default | \(\frac {f \ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right )}{h^{2} \sqrt {c}}-\frac {\left (e h -2 f g \right ) \ln \left (\frac {\frac {2 a \,h^{2}+2 c \,g^{2}}{h^{2}}-\frac {2 c g \left (x +\frac {g}{h}\right )}{h}+2 \sqrt {\frac {a \,h^{2}+c \,g^{2}}{h^{2}}}\, \sqrt {\left (x +\frac {g}{h}\right )^{2} c -\frac {2 c g \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}+c \,g^{2}}{h^{2}}}}{x +\frac {g}{h}}\right )}{h^{3} \sqrt {\frac {a \,h^{2}+c \,g^{2}}{h^{2}}}}+\frac {\left (d \,h^{2}-e g h +f \,g^{2}\right ) \left (-\frac {h^{2} \sqrt {\left (x +\frac {g}{h}\right )^{2} c -\frac {2 c g \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}+c \,g^{2}}{h^{2}}}}{\left (a \,h^{2}+c \,g^{2}\right ) \left (x +\frac {g}{h}\right )}-\frac {c g h \ln \left (\frac {\frac {2 a \,h^{2}+2 c \,g^{2}}{h^{2}}-\frac {2 c g \left (x +\frac {g}{h}\right )}{h}+2 \sqrt {\frac {a \,h^{2}+c \,g^{2}}{h^{2}}}\, \sqrt {\left (x +\frac {g}{h}\right )^{2} c -\frac {2 c g \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}+c \,g^{2}}{h^{2}}}}{x +\frac {g}{h}}\right )}{\left (a \,h^{2}+c \,g^{2}\right ) \sqrt {\frac {a \,h^{2}+c \,g^{2}}{h^{2}}}}\right )}{h^{4}}\) | \(390\) |
[In]
[Out]
Timed out. \[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=\int \frac {d + e x + f x^{2}}{\sqrt {a + c x^{2}} \left (g + h x\right )^{2}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 419 vs. \(2 (155) = 310\).
Time = 0.23 (sec) , antiderivative size = 419, normalized size of antiderivative = 2.49 \[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=-\frac {\sqrt {c x^{2} + a} f g^{2}}{c g^{2} h^{2} x + a h^{4} x + c g^{3} h + a g h^{3}} + \frac {\sqrt {c x^{2} + a} e g}{c g^{2} h x + a h^{3} x + c g^{3} + a g h^{2}} - \frac {\sqrt {c x^{2} + a} d}{c g^{2} x + a h^{2} x + \frac {c g^{3}}{h} + a g h} + \frac {f \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {c} h^{2}} + \frac {c f g^{3} \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{{\left (a + \frac {c g^{2}}{h^{2}}\right )}^{\frac {3}{2}} h^{5}} - \frac {c e g^{2} \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{{\left (a + \frac {c g^{2}}{h^{2}}\right )}^{\frac {3}{2}} h^{4}} + \frac {c d g \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{{\left (a + \frac {c g^{2}}{h^{2}}\right )}^{\frac {3}{2}} h^{3}} - \frac {2 \, f g \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{\sqrt {a + \frac {c g^{2}}{h^{2}}} h^{3}} + \frac {e \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{\sqrt {a + \frac {c g^{2}}{h^{2}}} h^{2}} \]
[In]
[Out]
Exception generated. \[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {d+e x+f x^2}{(g+h x)^2 \sqrt {a+c x^2}} \, dx=\int \frac {f\,x^2+e\,x+d}{{\left (g+h\,x\right )}^2\,\sqrt {c\,x^2+a}} \,d x \]
[In]
[Out]